<template>
	<view class="bodyContent">
		<!-- 登录 -->
		<view class="login_er" v-if="typeShow != 3">
			<!-- 头部 -->
			<view class="loginHeader">
				<view :class="typeShow == 1 ? 'on' : ''" @click="typeShow = 1">密码登录</view>
				<view :class="typeShow == 2 ? 'on' : ''" @click="typeShow = 2">验证码登录</view>
			</view>
			
			<view class="mainContent">
				<!-- 密码登录 -->
				<view class="passwordBox" v-if="typeShow == 1">
					<view>
						<input type="text" v-model="phone" placeholder="手机号"  @blur="verifyMobile">
					</view>
					<view>
						<input type="password" v-model="password"  placeholder="密码">
					</view>
				</view>
				
				<!-- 验证码提示 -->
				<view class="authCode" v-if="typeShow == 2">
					<view>
						<input type="text"  v-model="phone" placeholder="手机号" @blur="verifyMobile">
					</view>
					<view>
						<input type="text" v-model="code" placeholder="验证码">
						<button @click="sendCode">{{codeMsg}}</button>
					</view>
				</view>
			
				<!-- 登录 -->
				<view class="toLogin" @click="login">登录</view>
				
				<view class="function">
					<navigator url="/pages/login/registe">注册账号</navigator>
					<navigator url="/pages/login/modifyPassword">忘记密码</navigator>
				</view>
				
				<!-- 微信登录 -->
				<view class="weixin"  @click="getOpenId(getUrlParam('code'))">
					<image src="../../static/img/wxLogin.png"></image>
					<view>微信登录</view>
				</view>
			</view>
		</view>
		<u-modal v-model="showModal" :show-cancel-button="showCancelButton" :confirm-text="confirmText" :cancel-text="cancelText" @confirm="Modalconfirm" :content="showContent"></u-modal>
	</view>
</template>

<script src="../../static/js/login/login.js"></script>

<style lang="scss" scoped>
	@import  '../../static/css/login/login.scss'
</style>
